<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 10px;
            margin: 100px auto;
            border: 1px solid black;
            border-radius:5px 5px 5px 5px;
        }
        div::before{
            content: "";
            display: block;
            width: 50%;
            height: 100%;
            background-color: aqua;
            border-radius:5px 5px 5px 5px;
            transition: width 1s;
        }
        div:hover::before{
            width: 100%;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>